import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
import hospSetList from './views/hospSet/hospSetList.vue'
import hospSetAdd from './views/hospSet/hospSetAdd.vue'
import dictList from './views/dict/dictList.vue'
import hospitalList from './views/hosptal/hospitalList.vue'
import showDetails from './views/hosptal/showDetails.vue'
import department from './views/hosptal/department.vue'
import userList from './views/user/userList.vue'

let routes = [
  {
    path: '/login',
    component: Login,
    name: '登录',
    hidden: true
  },
  {
    path: '/404',
    component: NotFound,
    name: '404',
    hidden: true
  },
  {
    path: '/hospSet',
    component: Home,
    name: '医院设置管理',
    iconCls: 'fa fa-id-card-o',
    children: [
      { path: '/hospSet/list', component: hospSetList, name: '医院设置列表' },
      { path: '/hospSet/add', component: hospSetAdd, name: '医院设置添加' },
      { path: '/hospSet/hospitalList', component: hospitalList, name: '医院列表' },
      { path: '/hospSet/showDetails/:id', component: showDetails, name: ' 医院列表 / 医院详情', hidden: true },
      { path: '/hospSet/department/:hoscode', component: department, name: ' 医院列表 / 排班', hidden: true }
    ]
  },
  {
    path: '/cmn',
    component: Home,
    name: '数据字典管理',
    iconCls: 'el-icon-message',//图标样式class
    children: [
      { path: '/cmn/dict', component: dictList, name: '数据字典列表' },
    ]
  },
  {
    path: '/user',
    component: Home,
    name: '用户管理',
    iconCls: 'el-icon-user',//图标样式class
    children: [
      { path: '/user/userinfo', component: userList, name: '用户列表' },
    ]
  },
  // {
  //   path: '/',
  //   component: Home,
  //   name: '',
  //   iconCls: 'fa fa-address-card',
  //   leaf: true,//只有一个节点
  //   children: [
  //     { path: '/page6', component: Page6, name: '导航三' }
  //   ]
  // },
  {
    path: '/',
    component: Home,
    name: 'Charts',
    iconCls: 'fa fa-bar-chart',
    children: [
      { path: '/echarts', component: echarts, name: 'echarts' }
    ]
  },
  {
    path: '*',
    hidden: true,
    redirect: { path: '/404' }
  }
];

export default routes;